package com.dingxin.ship_together_api.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dingxin.ship_together_api.entity.SysUser;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * Author: ctj
 * Date: 2022-08-08
 * Time: 17:16
 */

public interface SysUserService extends IService<SysUser> {


    /**
     * 校验验证码
     * @param verifyCode 验证码
     * @return 校验结果
     */
    boolean checkVerifyCode(String verifyCode, HttpServletRequest request);

    /**
     * 获取openId和SessionId并存入本地session中，返回openId给前端备用
     * @param code
     * @return
     */
    String getOpenIdByCode(String code);

    /**
     * 解密出用户手机号和openId并返回
     * @param encryptedData
     * @param iv
     * @return
     */
    Map<String,String> login(String encryptedData,String iv,String code);
}





